package com.lovo.ssc.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lovo.ssc.entity.Customer;
import com.lovo.ssc.entity.Shelves;
import com.lovo.ssc.entity.SysGoods;
import com.lovo.ssc.mapper.ShelvesMapper;
import com.lovo.ssc.service.IShelvesService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author lovo
 * @since 2022-07-07
 */
@Service
public class ShelvesServiceImpl extends ServiceImpl<ShelvesMapper, Shelves> implements IShelvesService {

    @Override
    public void add(Shelves shelves) {
        baseMapper.add(shelves);
    }

    public void update(String code , float price){
        baseMapper.update(code,price);
     }

    @Override
    public void upGoodsStatue(String code, String statue) {

        baseMapper.upGoodsStatue(code, statue);
    }
//    @Override
//    public SysGoods findGoodsByBatch(String batch) {
//
//        return baseMapper.findGoodsByBatch(batch);
//    }

    @Override
    public void delShelves(String code) {

        baseMapper.delShelves(code);
    }

    @Override
    public List<Shelves> findAllShelves() {

        return baseMapper.findAllShelves();
    }

    @Override
    public List<SysGoods> findAll() {
        return baseMapper.findAll();
    }


//    @Override
//    public void updateGoodsNum(String batch, int num) {
//        baseMapper.updateGoodsNum(batch, num);
//    }

    @Override
    public SysGoods findGoodsByCode(String code) {

        return baseMapper.findGoodsByCode(code);
    }

    @Override
    public List<SysGoods> findByItem(String name, String state) {
        return baseMapper.findByItem(name, state);
    }
}
